<script>
import { mapState } from 'vuex'

export default {
  name: 'order-bottom-menu',
  props: {
    handleSubmit: Function
  },
  computed: { ...mapState('Order', ['orderAmount']) }
}
</script>


<template>
  <div class="order-bottom-menu">
    <span class="price">合计: <span class="num">￥{{orderAmount}}</span></span>
    <span class="submit" @click="handleSubmit">确认并支付</span>
  </div>
</template>

<style lang="scss" scoped>
.order-bottom-menu {
  display: flex;
  align-items: stretch;
  box-shadow: 0 0 5px #ccc;

  .price,
  .submit {
    width: 50%;
  }
  .price {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
  }
  .num {
    color: $main-color;
  }
  .submit {
    color: #fff;
    text-align: center;
    font-weight: bold;
    line-height: 3;
    background-color: $main-color;
  }
}
</style>

